package com.njbdqn.myhouse.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.njbdqn.myhouse.composes.page.IPageDAO;
import com.njbdqn.myhouse.domain.Users;

public interface UsersDAO extends IPageDAO<Users>{
	@Select("select * from users where id = #{id}")
	public Users findByUserid(int id);
	@Insert("insert into users values(seq_userid.nextval,#{name},#{password},#{telephone},#{isadmin},#{username})")
	public void saveUsers(Users user);
	@Update("update users set name = #{name},password = #{password},telephone =#{telephone},username = #{username} where id = #{id}")
	public void updateUsers(Users user);
	@Delete("delete from users where id = #{id}")
	public void delUsers(int id);
}
